// @ts-ignore
/* eslint-disable */
import request from "@/util/request.ts";

/** 此处后端没有提供注释 POST /user/add */
export async function add(
  body: API.AddUserDto,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean>("/user/add", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 GET /user/checkCode */
export async function getCheckCode(options?: { [key: string]: any }) {
  return request<API.BaseResponseMapStringString>("/user/checkCode", {
    method: "GET",
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /user/emailCode */
export async function getEmailCode(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getEmailCodeParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean>("/user/emailCode", {
    method: "POST",
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 GET /user/get/vo */
export async function getUserInfoVo(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getUserInfoVoParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseUserVo>("/user/get/vo", {
    method: "GET",
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 GET /user/getAdminUserInfo */
export async function getAdminUserInfo(options?: { [key: string]: any }) {
  return request<API.BaseResponseUserInfoAdminVO>("/user/getAdminUserInfo", {
    method: "GET",
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 GET /user/getIdAddress */
export async function ipAddress(options?: { [key: string]: any }) {
  return request<Record<string, any>>("/user/getIdAddress", {
    method: "GET",
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 GET /user/getUserInfo */
export async function getUserInfo(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getUserInfoParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseUserVo>("/user/getUserInfo", {
    method: "GET",
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /user/list/page */
export async function listUserByPage(
  body: API.UserQueryRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageUser>("/user/list/page", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /user/login */
export async function login(
  body: API.LoginDto,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean>("/user/login", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 GET /user/logout */
export async function logout(options?: { [key: string]: any }) {
  return request<API.BaseResponseBoolean>("/user/logout", {
    method: "GET",
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /user/register */
export async function register(
  body: API.RegiSterDto,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean>("/user/register", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /user/remove */
export async function removeUser(
  body: API.RemoveUserDto,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean>("/user/remove", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 GET /user/statistics */
export async function getUserStatistics(options?: { [key: string]: any }) {
  return request<API.BaseResponseListUserCountVo>("/user/statistics", {
    method: "GET",
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /user/update/user */
export async function adminUpdateUser(
  body: API.AdminUpdateUserDto,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean>("/user/update/user", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /user/updatePassword */
export async function updatePassword(
  body: API.UpdatePasswordDto,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean>("/user/updatePassword", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /user/updateUserinfo */
export async function updateUserinfo(
  body: API.UpdateUserinfoDto,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean>("/user/updateUserinfo", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /user/verificationCode */
export async function checkCode(
  body: API.CheckCodeDto,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean>("/user/verificationCode", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}
